package linkedlist;



public class Test {
    public static void test1(){
        MyLinkedList list = new MyLinkedList();
        list.addFirst("a");
        list.addFirst("b");
        list.addFirst("c");
        list.addFirst("d");
        System.out.println(list);
    }
    public static void test2(){
        MyLinkedList list = new MyLinkedList();
        //list.addFirst("x");
        list.addLast("a");
        list.addLast("b");
        list.addLast("c");
        list.addLast("d");
        System.out.println(list);
    }
    public static void test3(){
        MyLinkedList list = new MyLinkedList();
        list.addFirst("a");
        list.addFirst("b");
        list.addFirst("c");
        list.addFirst("d");
        list.add(2,"x");
        System.out.println(list);
    }
    public static void test4(){
        MyLinkedList list = new MyLinkedList();
        list.addFirst("a");
        list.addFirst("b");
        list.addFirst("c");
        list.addFirst("d");
        list.add(2,"x");
        System.out.println(list.contain("x"));
        System.out.println(list.contain("m"));
        System.out.println(list.indexOf("x"));
        System.out.println(list.indexOf("m"));
    }
    public static void test5(){
        MyLinkedList list = new MyLinkedList();
        list.addFirst("a");
        list.addFirst("b");
        list.addFirst("c");
        list.addFirst("d");
        System.out.println(list);
        list.remove(2);
        list.remove(0);
        System.out.println(list);
    }
    public static void main(String[] args) {
        //test1();
        //test2();
        //test3();
        //test4();
        //test5();
    }
}
